import { useRequest } from 'umi';
import { getThemeList } from '../service';

function useThemeData() {
  const { data, loading, run, refresh } = useRequest(() => {
    return getThemeList();
  });

  return {
    data,
    loading,
    run,
    reloadRefresh: refresh
  };
}

export { useThemeData };
